#include "vmainwindow.h"
#include "vdialogbox.h"
#include "vinfobar.h"
#include "vtexteditbox.h"
#include "vchathistorybox.h"
#include <QVBoxLayout>

VDialogBox::VDialogBox(QWidget* parent)
    : QWidget(parent)
    , m_pBoxLayout(new QVBoxLayout(this))
    , m_pInfoBar(new VInfoBar(this))
    , m_pTextEditBox(new VTextEditBox(this))
    , m_pChatHistoryBox(new VChatHistoryBox(this))
{
    setMinimumWidth(421);
    setAttribute(Qt::WA_StyledBackground, true);//默认Qwidget类 无法设置颜色
    setStyleSheet(R"(
        VDialogBox
        {
            background-color: #F5F5F5; 
        }
     )");
    m_pBoxLayout->setSpacing(0);
    m_pBoxLayout->setContentsMargins(0, 0, 0, 0);
    m_pBoxLayout->addWidget(m_pInfoBar);
    m_pBoxLayout->addWidget(m_pTextEditBox);
    m_pBoxLayout->addWidget(m_pChatHistoryBox);
}

VDialogBox::~VDialogBox()
{}